webpackJsonp([23],{

/***/ 172:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(389)
  __webpack_require__(392)
}
var normalizeComponent = __webpack_require__(0)
/* script */
var __vue_script__ = __webpack_require__(394)
/* template */
var __vue_template__ = __webpack_require__(399)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "resources/assets/js/view/login/login.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-5f402eea", Component.options)
  } else {
    hotAPI.reload("data-v-5f402eea", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 389:
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(390);
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var update = __webpack_require__(4)("1f4f6fa5", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5f402eea\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./login.vue", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5f402eea\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/less-loader/dist/cjs.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./login.vue");
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),

/***/ 390:
/***/ (function(module, exports, __webpack_require__) {

var escape = __webpack_require__(10);
exports = module.exports = __webpack_require__(1)(false);
// imports


// module
exports.push([module.i, "\n.login {\n  width: 100%;\n  height: 100%;\n  background-image: url(" + escape(__webpack_require__(391)) + ");\n  background-size: cover;\n  background-position: center;\n  position: relative;\n}\n.login-con {\n  position: absolute;\n  right: 160px;\n  top: 50%;\n  -webkit-transform: translateY(-60%);\n          transform: translateY(-60%);\n  width: 300px;\n}\n.login-con-header {\n  font-size: 16px;\n  font-weight: 300;\n  text-align: center;\n  padding: 30px 0;\n}\n.login-con .form-con {\n  padding: 10px 0 0;\n}\n.login-con .login-tip {\n  font-size: 10px;\n  text-align: center;\n  color: #c3c3c3;\n}\n", ""]);

// exports


/***/ }),

/***/ 391:
/***/ (function(module, exports) {

module.exports = "/images/login-bg.jpg?0899ffa6d98e086a98b5c9282d123434";

/***/ }),

/***/ 392:
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__(393);
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var update = __webpack_require__(4)("528c1862", content, false, {});
// Hot Module Replacement
if(false) {
 // When the styles change, update the <style> tags
 if(!content.locals) {
   module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5f402eea\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./login.vue", function() {
     var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5f402eea\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./login.vue");
     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
     update(newContent);
   });
 }
 // When the module is disposed, remove the <style> tags
 module.hot.dispose(function() { update(); });
}

/***/ }),

/***/ 393:
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(1)(false);
// imports


// module
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", ""]);

// exports


/***/ }),

/***/ 394:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__c_login_form__ = __webpack_require__(395);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vuex__ = __webpack_require__(9);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ __webpack_exports__["default"] = ({
  components: {
    LoginForm: __WEBPACK_IMPORTED_MODULE_0__c_login_form__["a" /* default */]
  },
  methods: _extends({}, Object(__WEBPACK_IMPORTED_MODULE_1_vuex__["b" /* mapActions */])(['handleLogin', 'getUserInfo']), {
    handleSubmit: function handleSubmit(_ref) {
      var _this = this;

      var userName = _ref.userName,
          password = _ref.password;

      this.handleLogin({ userName: userName, password: password }).then(function (res) {
        _this.getUserInfo().then(function (res) {
          _this.$router.push({
            name: 'home'
          });
        });
      });
    }
  })
});

/***/ }),

/***/ 395:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__login_form_vue__ = __webpack_require__(396);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__login_form_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__login_form_vue__);

/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__login_form_vue___default.a);

/***/ }),

/***/ 396:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
var normalizeComponent = __webpack_require__(0)
/* script */
var __vue_script__ = __webpack_require__(397)
/* template */
var __vue_template__ = __webpack_require__(398)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "resources/assets/js/components/login-form/login-form.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-3fe30f68", Component.options)
  } else {
    hotAPI.reload("data-v-3fe30f68", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 397:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_axios__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ __webpack_exports__["default"] = ({
  name: 'LoginForm',
  props: {
    userNameRules: {
      type: Array,
      default: function _default() {
        return [{ required: true, message: '账号不能为空', trigger: 'blur' }];
      }
    },
    passwordRules: {
      type: Array,
      default: function _default() {
        return [{ required: true, message: '密码不能为空', trigger: 'blur' }];
      }
    }
  },
  data: function data() {
    return {
      form: {
        userName: '',
        password: ''
      },
      registe: {
        userName: '',
        password: ''
      },
      modal1: false
    };
  },

  computed: {
    rules: function rules() {
      return {
        userName: this.userNameRules,
        password: this.passwordRules
      };
    }
  },
  methods: {
    //注册功能
    handleSubmits: function handleSubmits() {
      this.modal1 = true;
    },
    ok: function ok() {
      __WEBPACK_IMPORTED_MODULE_0_axios___default.a.post('api/register?name=' + this.registe.userName + '&password=' + this.registe.password).then(function (res) {

        console.log('注册成功');
      });
    },
    cancel: function cancel() {
      console.log('您点击了取消');
    },

    //注册功能end
    handleSubmit: function handleSubmit() {
      var _this = this;

      this.$refs.loginForm.validate(function (valid) {
        if (valid) {
          _this.$emit('on-success-valid', {
            userName: _this.form.userName,
            password: _this.form.password
          });
        }
      });
    }
  }
});

/***/ }),

/***/ 398:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "Form",
    {
      ref: "loginForm",
      attrs: { model: _vm.form, rules: _vm.rules },
      nativeOn: {
        keydown: function($event) {
          if (
            !("button" in $event) &&
            _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
          ) {
            return null
          }
          return _vm.handleSubmit($event)
        }
      }
    },
    [
      _c(
        "FormItem",
        { attrs: { prop: "userName" } },
        [
          _c(
            "Input",
            {
              attrs: { placeholder: "请输入用户名" },
              model: {
                value: _vm.form.userName,
                callback: function($$v) {
                  _vm.$set(_vm.form, "userName", $$v)
                },
                expression: "form.userName"
              }
            },
            [
              _c(
                "span",
                { attrs: { slot: "prepend" }, slot: "prepend" },
                [_c("Icon", { attrs: { size: 16, type: "ios-person" } })],
                1
              )
            ]
          )
        ],
        1
      ),
      _vm._v(" "),
      _c(
        "FormItem",
        { attrs: { prop: "password" } },
        [
          _c(
            "Input",
            {
              attrs: { type: "password", placeholder: "请输入密码" },
              model: {
                value: _vm.form.password,
                callback: function($$v) {
                  _vm.$set(_vm.form, "password", $$v)
                },
                expression: "form.password"
              }
            },
            [
              _c(
                "span",
                { attrs: { slot: "prepend" }, slot: "prepend" },
                [_c("Icon", { attrs: { size: 14, type: "md-lock" } })],
                1
              )
            ]
          )
        ],
        1
      ),
      _vm._v(" "),
      _c(
        "FormItem",
        [
          _c(
            "Button",
            {
              attrs: { type: "primary", long: "" },
              on: {
                click: function($event) {
                  _vm.handleSubmits()
                }
              }
            },
            [_vm._v("注册")]
          ),
          _vm._v(" "),
          _c(
            "modal",
            {
              attrs: { title: "注册" },
              on: { "on-ok": _vm.ok, "on-cancel": _vm.cancel },
              model: {
                value: _vm.modal1,
                callback: function($$v) {
                  _vm.modal1 = $$v
                },
                expression: "modal1"
              }
            },
            [
              _c(
                "FormItem",
                { attrs: { prop: "userName" } },
                [
                  _c(
                    "Input",
                    {
                      attrs: { placeholder: "请输入用户名" },
                      model: {
                        value: _vm.registe.userName,
                        callback: function($$v) {
                          _vm.$set(_vm.registe, "userName", $$v)
                        },
                        expression: "registe.userName"
                      }
                    },
                    [
                      _c(
                        "span",
                        { attrs: { slot: "prepend" }, slot: "prepend" },
                        [
                          _c("Icon", {
                            attrs: { size: 16, type: "ios-person" }
                          })
                        ],
                        1
                      )
                    ]
                  )
                ],
                1
              ),
              _vm._v(" "),
              _c(
                "FormItem",
                { attrs: { prop: "password" } },
                [
                  _c(
                    "Input",
                    {
                      attrs: { type: "password", placeholder: "请输入密码" },
                      model: {
                        value: _vm.registe.password,
                        callback: function($$v) {
                          _vm.$set(_vm.registe, "password", $$v)
                        },
                        expression: "registe.password"
                      }
                    },
                    [
                      _c(
                        "span",
                        { attrs: { slot: "prepend" }, slot: "prepend" },
                        [_c("Icon", { attrs: { size: 14, type: "md-lock" } })],
                        1
                      )
                    ]
                  )
                ],
                1
              )
            ],
            1
          ),
          _vm._v(" "),
          _c(
            "Button",
            {
              attrs: { type: "primary", long: "" },
              on: { click: _vm.handleSubmit }
            },
            [_vm._v("登录")]
          )
        ],
        1
      )
    ],
    1
  )
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-3fe30f68", module.exports)
  }
}

/***/ }),

/***/ 399:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", { staticClass: "login" }, [
    _c(
      "div",
      { staticClass: "login-con" },
      [
        _c(
          "Card",
          { attrs: { icon: "log-in", title: "欢迎登录", bordered: false } },
          [
            _c(
              "div",
              { staticClass: "form-con" },
              [
                _c("login-form", {
                  on: { "on-success-valid": _vm.handleSubmit }
                }),
                _vm._v(" "),
                _c("p", { staticClass: "login-tip" }, [
                  _vm._v("输入任意用户名和密码即可")
                ])
              ],
              1
            )
          ]
        )
      ],
      1
    )
  ])
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-5f402eea", module.exports)
  }
}

/***/ })

});